<?php
require_once 'environment.php';return array(    'basePath' 	=> dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',    'name' 		=> SITE_NAME,    'language' 	=> LOCALE,    'theme' 	=> THEME,    'preload' 	=> array('log'),
	/*
     * config import
     */    'import' => array(
		'application.includes.core.*',
        'application.includes.utils.*',        'application.helpers.*',        'application.models.*',        'application.models.base.*',
		'application.components.*',
		'application.extensions.excel.*'    ),
    /*
     * config module
     */    'modules' => array(        'admin',
    	'menu',
		'announcement',
    	'courses',
    	'member',
		'comments',        'user'=>array(
            # encrypting method (php hash function)
            'hash' => 'md5',
            # send activation email
            'sendActivationMail' => true,
            # allow access for non-activated users
            'loginNotActiv' => false,
            # activate user on registration (only sendActivationMail = false)
            'activeAfterRegister' => false,
            # automatically login from registration
            'autoLogin' => true,
            # registration path
            'registrationUrl' => array('/user/registration'),
            # recovery password path
            'recoveryUrl' => array('/user/recovery'),
            # login form path
            'loginUrl' => array('/user/login/admin'),
            # page after login
            'returnUrl' => array('/user/profile'),
            # page after logout
            'returnLogoutUrl' => array('/user/login'),        ),    	 'gii' => array(            'class' => 'system.gii.GiiModule',            'password' => 'gii',			'ipFilters' => array('127.0.0.1', '::1'),            'generatorPaths' => array(                'application.gii'  //Ajax Crud template path            ),        ),    ),
	/*
     * config components
     */    'components' => array(        'db' => array(            'class' 			=> 'CDbConnection',            'connectionString' 	=> DB_CONNECTION,            'emulatePrepare' 	=> true,            'username' 			=> DB_USER,            'password' 			=> DB_PWD,            'charset' 			=> DB_CHARSET,            'tablePrefix' 		=> DB_TABLE_PREFIX,    		'enableProfiling'	=> true,        	'enableParamLogging'=> true,        ),        'image'=>array(          'class'=>'application.extensions.image.CImageComponent',            // GD or ImageMagick            'driver'=>'GD',            // ImageMagick setup path            'params'=>array('directory'=>'/opt/local/bin'),        ),        'shoppingCart' => array(            'class' => 'ext.cart.EShoppingCart',        ),        'user' => array(            'class' => 'application.includes.core.auth.WebUser',            'allowAutoLogin' => true,            //'loginUrl' => array('user/login2')        ),        /*'mail' => array(
            'class' => 'ext.yii-mail.YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.gmail.com',
                'username' => 'manage.khuyentaiclub@gmail.com',
                'password' => '123456lt.',
                'port' => '465',
                'encryption'=>'ssl',
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),*/
        'Smtpmail'=>array(
            'class'=>'application.extensions.smtpmail.PHPMailer',
            'Host'=>"smtp.gmail.com",
            'Username'=>'manage.khuyentaiclub@gmail.com',
            'Password'=>'123456lt.',
            'Mailer'=>'smtp',
            'Port'=>587,
            'SMTPAuth'=>true,
            'SMTPSecure' => 'tls',
        ),        'authManager' => array(            'class' => 'application.modules.srbac.components.SDbAuthManager',            'connectionID' => 'db',            'itemTable' => 'auth_item',            'assignmentTable' => 'auth_assignment',            'itemChildTable' => 'auth_item_child',        ),        'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning, trace',
					'categories'=>'system.db.*',
					'logFile'=>'sql.log',
				),
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'trace, warning, error',
					'categories'=>'system.*, php',
					//'except'=>'system.db.*',
					'maxFileSize' => 1024 * 100, //100 MB
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	    'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'caseSensitive'=>false,
        	'rules' => array(
        		'menu/index' 	=> 'menu/menu/index',
        		'administrator' => 'user/login/admin',
        		'login' 		=> 'user/login',
        		'site/login' 	=> 'user/login',
        	)
        ),
        'CLinkPager' => array(
            'class' => 'CLinkPager',
            'cssFile' => false,
        ),
        'cache' => array(
            'class' => 'system.caching.CFileCache',
        ),
        'errorHandler' => array(
            'errorAction' => 'error/show',
        ),
        'session' => array(
		      'class' => 'CDbHttpSession',
		      'timeout' => 5222,
		),    ),
	'params'=>array(
			// this is used in contact page
			'adminEmail'=>'manage.khuyentaiclub@gmail.com',
	),);